package com.platform.schedule;

import com.platform.utils.ScheduleUtils;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.annotation.DependsOn;
import org.springframework.stereotype.Component;

/**
 * Created by zhu.xiang on 2018/11/13 0013.
 */
@Component
@DependsOn("springContextUtils")
public class JobInit implements ApplicationContextAware {
    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        ScheduleUtils.refreshUserLevelJob();
        ScheduleUtils.refreshUserFreezeAccountJob();
    }
}
